<?php
$form = $this->beginWidget('PsActiveForm', array(
	'id' => 'admin-accounts-addtax-form',
	'enableAjaxValidation' => FALSE
		));
?>
<div class="">
	<table class="form-table">
		<tr>
			<th width="120" scope="row">
				<?php echo $form->labelEx($tax, 'tax_type_id', array('label' => 'Tax Type')); ?>
			</th>
			<td>
				<div class="">
					<?php echo $form->dropDownList($tax, 'tax_type_id', CHtml::listData(TaxType::model()->ofOwnerParty($tax->owner_party_id)->findAll(), 'id', 'name'), array('disabled' => 'disabled', 'prompt' => '[Select]')); ?>
					<?php echo $form->error($tax, 'tax_type_id'); ?>
				</div>

			</td>
		</tr>
		<tr>
			<th>
				<?php echo $form->labelEx($tax, 'rate'); ?>
			</th>

			<td>
				<?php echo $form->textField($tax, 'rate'); ?>%
				<?php echo $form->error($tax, 'rate'); ?>
			</td>
		</tr>
		<tr>
			<th width="120" scope="row">
				<?php echo $form->labelEx($tax, 'from_date', array('label' => 'Effective From')); ?>
			</th>
			<td>
				<div class="">
					<?php
					$form->widget('PsJuiDatePicker', array(
						'model' => $tax,
						'attribute' => 'from_date',
						'options' => array(
							'showButtonPanel' => false,
							'changeYear' => true,
							'dateFormat' => 'dd-mm-yy',
						),
					));
					?>
					<?php echo $form->error($tax, 'from_date'); ?>
				</div>

			</td>
		</tr>
	</table>
	
	<table class="form-table">
		<th>
			<button type="submit" class="link-button round_all no-margin">
				<span>Save Changes</span>
			</button>
		</th>
	</table>
</div>

<?php $this->endWidget(); ?>

<div id="div_tax_type" style="display:none;">
	<div id="dlg_CreateTaxType">
		<form id="dlg_CreateTaxType">
			<table>
				<tr>
					<td width="100">
						<label>New Tax Type</label>
					</td>
					<td>
						<input type="text" name="name" id="newTaxType"> </input>
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>

